package cn.jc.infra.basic.basic.service.impl;

import cn.jc.infra.basic.basic.entity.SubjectCategory;
import cn.jc.infra.basic.basic.dao.SubjectCategoryMapper;
import cn.jc.infra.basic.basic.service.SubjectCategoryService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 题目分类 服务实现类
 * </p>
 *
 * @author testjava
 * @since 2024-02-19
 */
@Service
public class SubjectCategoryServiceImpl extends ServiceImpl<SubjectCategoryMapper, SubjectCategory> implements SubjectCategoryService {

    @Resource
    private SubjectCategoryMapper subjectCategoryMapper;
    @Override
    public int insert(SubjectCategory subjectCategory) {
        return subjectCategoryMapper.subjectCategoryInsert(subjectCategory);
    }

    @Override
    public Integer querySubjectCount(Long id) {
        return subjectCategoryMapper.querySubjectCount(id);
    }

    @Override
    public List<SubjectCategory> queryCategory(SubjectCategory subjectCategory) {
        return subjectCategoryMapper.queryCategory(subjectCategory);
    }

    @Override
    public List<SubjectCategory> queryCategoryByPrimary(SubjectCategory subjectCategory) {
        return subjectCategoryMapper.queryCategoryByPrimary(subjectCategory);
    }


    @Override
    public int updateSubjectCategory(SubjectCategory subjectCategory) {
        return subjectCategoryMapper.updateSubjectCategory(subjectCategory);
    }

    @Override
    public int updateCategoryService(SubjectCategory subjectCategory) {
         return subjectCategoryMapper.updateCategoryService(subjectCategory);
    }
}
